﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace IOCSolution
{
    public class DatabaseHelper
    {
        public IDatabase Database { get; private set; }

        public DatabaseHelper(IDatabase database)
        {
            Database = database;
        }

        public void Search(string commandText)
        {
            Database.Select(commandText);
        }

        public void Add(string commandText)
        {
            Database.Insert(commandText);
        }

        public void Save(string commandText)
        {
            Database.Update(commandText);
        }

        public void Remove(string commandText)
        {
            Database.Delete(commandText);
        }
    }
}
